<% person = current_person %>

<% @posts.each do |post| %>
<span style="color:blue"><%= post.floor %>
<% if post.floor != 1 %>回复：<% end %><%=h @topic.title %></span><br />
<%= post.content %><br /><br />
Author: <%= post.person.username %>
<%= post.created_at %>
<%= link_to 'Reply', '#replay' %>
<hr />
<% end %>

<% if person %>
<p>
<a name="replay">发表回复</a>
<%= form_tag "/posts" %>
<%= text_area_tag "content" %><br />
<%= hidden_field_tag "topic_id", @topic.id %>
<%= submit_tag "Post" %>
</p>
<% end %>

<%= link_to 'Back', '/topics' %>
